/*
 * THE FOLLOWING FIRMWARE IS PROVIDED: (1) "AS IS" WITH NO WARRANTY; AND 
 * (2)TO ENABLE ACCESS TO CODING INFORMATION TO GUIDE AND FACILITATE CUSTOMER.
 * CONSEQUENTLY, SEMTECH SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR
 * CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
 * OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
 * CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
 * 
 * Copyright (C) SEMTECH S.A.
 */
/*! 
 * \file       sx127x-dio.h
 * \brief      SX127x 
 *
 * \version    2.0.B2 
 * \date       May 6 2013
 * \author     Gregory Cristian
 *
 * Last modified by Miguel Luis on Jun 19 2013
 */
#ifndef __SX127X_DIO_H__
#define __SX127X_DIO_H__

#include "stdint.h"
#include "stdbool.h"


/*!
 * DIO state read functions mapping
 */
#define DIO0                                        sx127x_DioReadDio0( )
#define DIO1                                        sx127x_DioReadDio1( )
#define DIO2                                        sx127x_DioReadDio2( )
#define DIO3                                        sx127x_DioReadDio3( )
#define DIO4                                        sx127x_DioReadDio4( )
#define DIO5                                        sx127x_DioReadDio5( )


/*!
 * sx127x_DioInit
 */
void sx127x_DioInit(void);

/*!
 * sx127x_DioDeInit
 */
void sx127x_DioDeInit(void);

/*!
 * sx127x_Dio2EnableInt
 */
void sx127x_Dio2EnableInt( bool a_bEnable );

void sx127x_Gpio4Set( bool a_bReset );
void sx127x_Gpio5Set( bool a_bReset );
void sx127x_Gpio6Set( bool a_bReset );
/*!
 * sx127x_DioReset
 */
void sx127x_DioReset( bool a_bReset );

void sx127x_DioNssSelect( bool a_bReset );

/*!
 * sx127x_DioReadDio0
 */
extern uint8_t sx127x_DioReadDio0( void );

/*!
 * sx127x_DioReadDio1
 */
extern uint8_t sx127x_DioReadDio1( void );

/*!
 * sx127x_DioReadDio2
 */
extern uint8_t sx127x_DioReadDio2( void );

/*!
 * sx127x_DioReadDio3
 */
extern uint8_t sx127x_DioReadDio3( void );

/*!
 * sx127x_DioReadDio4
 */
extern uint8_t sx127x_DioReadDio4( void );

/*!
 * sx127x_DioReadDio5
 */
extern uint8_t sx127x_DioReadDio5( void );


extern uint32_t sx1278_GetCurrentMs(void);

#endif /*__sx127x_DIO_H__ */
/***************************************************************************************************
* HISTORY LIST
* 1. Create File by chuanpengl @ 20150707
*   context: here write modified history
*
***************************************************************************************************/

